package com.naizhuai.ui.web;

import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;

/**
 * @author：lichenxi
 * 2017/7/26 13
 * email：525603977@qq.com
 * Fighting
 */
public class ClipBoards {
    public static void copyToClipBoard(Context context, String text) {
        ClipData clipData = ClipData.newPlainText("shiganjia_copy", text);
        ClipboardManager manager = (ClipboardManager) context.getSystemService(
                Context.CLIPBOARD_SERVICE);
        manager.setPrimaryClip(clipData);
    }
}
